import {observable, action} from 'mobx'

class Model {
  @observable counter: number = 0

  @action counterStore(): void {
    this.counter++
  }

  @action increment(): void {
    this.counter++
  }

  @action decrement(): void {
    this.counter --
  }

  @action incrementAsync(): void {
    setTimeout(() => {
      this.counter++
    }, 1000)
  }

}

export default new Model()
